/*
 * @Descripttion: 
 * @Author: voanit
 * @Date: 2022-05-29 17:13:55
 * @LastEditors: voanit
 * @LastEditTime: 2022-05-29 18:02:12
 */
import React from 'react'
import { useHistory, useParams } from 'react-router-dom'
import { LoginState, HomeParams } from './types'
const Home = () => {
  const history = useHistory<LoginState>()
  const params = useParams<{ id: string }>()
  console.log(params, 87);

  const loginHandle = () => {
    history.push('/login', { a: "1" })
    // history.push({ pathname: '/login', state: { a: 2 } })
  }
  return <div>
    御剑乘风来,除魔天地间!Home
    <button onClick={loginHandle}>去login</button>
  </div>
};
export default Home